package com.justnow.offer;

import java.util.*;

/**
 * @author justnow
 * Created on 2020-09-13
 * Description
 */
public class Aiqiyi03 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();

        String[] s1 = s.split(" ");
        int[] array = new int[s1.length];
        for (int i = 0; i < s1.length; i++) {
            array[i] = Integer.valueOf(s1[i]);
        }

        Arrays.sort(array);

        for (int k = 0; k < array.length - 2; k++) {
            if (array[k] > 0) break;
            if (k > 0 && array[k] == array[k - 1])
                continue;
            int i = k + 1, j = array.length - 1;
            while (i < j) {
                int sum = array[k] + array[i] + array[j];
                if (sum < 0) {
                    while (i < j && array[i] == array[++i]);
                } else if (sum > 0) {
                    while (i < j && array[j] == array[--j]);
                } else {
                    List<Integer> temp = Arrays.asList(array[i], array[k], array[j]);
                    Collections.sort(temp);
                    for (Integer integer : temp) {
                        System.out.print(integer + " ");
                    }
                    System.out.println();
                    while (i < j && array[i] == array[++i]);
                    while (i < j && array[j] == array[--j]);
                }
            }
        }
    }
}
